
		<div class="ui-portlet">
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;个人中心</a></li>
			  <li class="active">活动列表</li>
			</ol>
		</div>
<style>
	.appmsg{position: relative;}
	.item-status{position:absolute;right:3px;top:0;font-size: 12px;}
	#maincontent{margin-bottom: 50px;}
</style>
		{{if !$is_mobile}}
		<hr>
       <div class="mb10">
			<a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}?model=Baoming">新增报名活动</a>
			<a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}?model=Qa">新增提议征集</a>
			<a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}?model=WxVote">新增投票活动</a>
       </div>
       <br/>
       <div>

		   <ul class="nav nav-tabs" role="tablist">
				<li {{if !$_REQUEST['model']}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array(),array('model'))}}">{{__('All')}}</a></li>
				<li {{if $_REQUEST['model']=='Qa'}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('model'=>'Qa'),array('model'))}}">提议征集</a></li>
				<li {{if $_REQUEST['model']=='Baoming'}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('model'=>'Baoming'),array('model'))}}">活动报名</a></li>
				<li {{if $_REQUEST['model']=='WxVote'}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('model'=>'WxVote'),array('model'))}}">投票</a></li>
		   </ul>

       </div>
		{{else}}
		<div>

			<ul class="nav nav-tabs" role="tablist">
				<li {{if !isset($_REQUEST['status'])}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array(),array('status'))}}">全部</a></li>
				<li {{if $_REQUEST['status']==1}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('status'=>1),array('status'))}}">进行中</a></li>
				<li {{if isset($_REQUEST['status']) && $_REQUEST['status']==0}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('status'=>0),array('status'))}}">已结束</a></li>
			</ul>

		</div>
		{{/if}}

       <div class="ui-portlet" style="margin-top:10px;">
	       <div class="row clearfix ui-portlet-list" id="storefront-list">
	       {{loop $datalist $item}}
	       	<div class="col-md-4">
	       		<div class="appmsg">
					<div class="item-status">{{if $item['WxActivity']['status']==1}}<span style="color:green;">进行中</span>{{else}}<span style="color:#aaa;">已结束</span>{{/if}}</div>
		       		<div class="appmsg_content">
		       		<h4><a href="{{$this->Html->url('/wx_activities/view/'.$item['WxActivity']['id'])}}" target="_blank">{{$item['WxActivity']['name']}}&nbsp;[点击预览]</a></h4>
		       		{{if $item['WxActivity']['coverimg']}}
		       		<div class="cover">{{$this->Html->image($item['WxActivity']['coverimg'])}}</div>
		       		{{/if}}
						{{if $item['WxActivity']['ended']}}
		       		<p>{{substr($item['WxActivity']['started'],0,16)}} ~ {{substr($item['WxActivity']['ended'],0,16)}}</p>
						{{/if}}
						<p>{{usubstr($item['WxActivity']['summary'],0,60,'...')}}</p>
		       		
		       		<div style="margin-bottom:5px;">
		       			{{if $item['WxActivity']['model'] == 'WxVote'}}
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Add Vote').'" class="fa fa-plus"></i> 新增投票项', array('controller'=>'wx_votes','action' => 'add', '?'=>array('aid'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
			       			&nbsp;
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Vote List').'" class="fa fa-list"></i> 查看投票项', array('controller'=>'wx_votes','action' => 'mine', '?'=>array('activity_id'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
		       			{{elseif $item['WxActivity']['model'] == 'Qa'}}
			       			<!-- {{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Add Vote').'" class="fa fa-plus"></i> 新增提议', array('controller'=>'qas','action' => 'add', '?'=>array('model'=>'WxActivity','data_id'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
			       			&nbsp; -->
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Vote List').'" class="fa fa-list"></i> 管理已有提议', array('controller'=>'qas','action' => 'lists', '?'=>array('model'=>'WxActivity','data_id'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
			       			
		       			{{/if}}
		       		</div>
		       			
		       			
		       		</div>
		       		<div class="appmsg_opr clearfix">
		       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Edit').'" class="fa fa-edit"></i> 编辑', array('controller'=>'wx_activities','action' => 'edit', $item['WxActivity']['id']),array('class'=>'col-xs-4 opr-edit','escape'=>false))}}

						<a  onclick="return ajaxAction(this.href);" href="/wx_activities/setstatus/{{$item['WxActivity']['id']}}/0" class="col-xs-4 opr-edit" data-placement="bottom" data-content="结束活动"><i data-toggle="tooltip" data-placement="top"
																																																						title="{{__('结束')}}" class="fa fa-power-off"></i> 结束</a>

		       			<a href="javascript:void(0)" data-url="{{$this->Html->url('/wx_activities/delete/'.$item['WxActivity']['id'])}}" class="col-xs-4 delete-pop" data-placement="bottom" data-content="确定删除此活动？"><i data-toggle="tooltip" data-placement="top"
		       			 title="{{__('Delete')}}" class="fa fa-trash"></i> 删除</a>
		       			 
		       			 <!-- {{$this->Html->link('', array('controller'=>'wx_msgs','action' => 'delete', $item['WxActivity']['id']),array('class'=>'col-xs-6','escape'=>false))}}
		       			  -->
		       		</div>
	       		</div>
	       	</div>
	  		{{/loop}}
	    	</div>
	    	<div>{{$page_navi}}</div>
    	</div>


		{{if $is_mobile}}
		<div id="cart1" class="cart-concern-btm-fixed">
			<div class="concern-cart">
				<a href="/wx_activities/lists?model=Baoming&status=1&creator={{$current_user_id}}" class="dong-dong-icn J_ping">
					<i class="fa fa-home"></i>
					<span class="focus-info">首页</span>
				</a>
				<a href="/users/index" class="love-heart-icn J_ping" >
					<i class="fa fa-user"></i>
					<span class="focus-info"> 我的  </span>
				</a>

			</div>
			<div class="action-list">
				<a href="/wx_activities/add?model=Baoming" class="red-color baoming-btn directorder" id="directorderBtm">
					我要分享
				</a>
			</div>
		</div>
		{{/if}}